let styleVariables = require('@/style/variables')
module.exports = {
  module: {
    rules: [
      {
        test: /\.css$/,
        use: ['style-loader', 'css-loader', 'sass-loader']
      },
	  {
	    test: /\.scss$/,
	    use: [
	      'css-loader',
	      'postcss-loader',
	      {
	        loader: 'sass-loader',
	        options: {
	          data: Object.keys(styleVariables)
	            .map(k => `\$${k}: ${styleVariables[k]};`)
	            .join('\n')
	        }
	      }
	    ]
	  }
    ]
  }
}